﻿using System;

namespace UnityEngine.PostProcessing
{
	// Token: 0x02000100 RID: 256
	[Serializable]
	public class EyeAdaptationModel : PostProcessingModel
	{
		// Token: 0x170000DB RID: 219
		// (get) Token: 0x060004F2 RID: 1266 RVA: 0x00027B45 File Offset: 0x00025D45
		// (set) Token: 0x060004F3 RID: 1267 RVA: 0x00027B4D File Offset: 0x00025D4D
		public EyeAdaptationModel.Settings settings
		{
			get
			{
				return this.m_Settings;
			}
			set
			{
				this.m_Settings = value;
			}
		}

		// Token: 0x060004F4 RID: 1268 RVA: 0x00027B56 File Offset: 0x00025D56
		public override void Reset()
		{
			this.m_Settings = EyeAdaptationModel.Settings.defaultSettings;
		}

		// Token: 0x040006EE RID: 1774
		[SerializeField]
		private EyeAdaptationModel.Settings m_Settings = EyeAdaptationModel.Settings.defaultSettings;

		// Token: 0x02000101 RID: 257
		public enum EyeAdaptationType
		{
			// Token: 0x040006F0 RID: 1776
			Progressive,
			// Token: 0x040006F1 RID: 1777
			Fixed
		}

		// Token: 0x02000102 RID: 258
		[Serializable]
		public struct Settings
		{
			// Token: 0x170000DC RID: 220
			// (get) Token: 0x060004F5 RID: 1269 RVA: 0x00027B64 File Offset: 0x00025D64
			public static EyeAdaptationModel.Settings defaultSettings
			{
				get
				{
					return new EyeAdaptationModel.Settings
					{
						lowPercent = 45f,
						highPercent = 95f,
						minLuminance = -5f,
						maxLuminance = 1f,
						keyValue = 0.25f,
						dynamicKeyValue = true,
						adaptationType = EyeAdaptationModel.EyeAdaptationType.Progressive,
						speedUp = 2f,
						speedDown = 1f,
						logMin = -8,
						logMax = 4
					};
				}
			}

			// Token: 0x040006F2 RID: 1778
			[Tooltip("Filters the dark part of the histogram when computing the average luminance to avoid very dark pixels from contributing to the auto exposure. Unit is in percent.")]
			[Range(1f, 99f)]
			public float lowPercent;

			// Token: 0x040006F3 RID: 1779
			[Range(1f, 99f)]
			[Tooltip("Filters the bright part of the histogram when computing the average luminance to avoid very dark pixels from contributing to the auto exposure. Unit is in percent.")]
			public float highPercent;

			// Token: 0x040006F4 RID: 1780
			[Tooltip("Minimum average luminance to consider for auto exposure (in EV).")]
			public float minLuminance;

			// Token: 0x040006F5 RID: 1781
			[Tooltip("Maximum average luminance to consider for auto exposure (in EV).")]
			public float maxLuminance;

			// Token: 0x040006F6 RID: 1782
			[Min(0f)]
			[Tooltip("Exposure bias. Use this to offset the global exposure of the scene.")]
			public float keyValue;

			// Token: 0x040006F7 RID: 1783
			[Tooltip("Set this to true to let Unity handle the key value automatically based on average luminance.")]
			public bool dynamicKeyValue;

			// Token: 0x040006F8 RID: 1784
			[Tooltip("Use \"Progressive\" if you want the auto exposure to be animated. Use \"Fixed\" otherwise.")]
			public EyeAdaptationModel.EyeAdaptationType adaptationType;

			// Token: 0x040006F9 RID: 1785
			[Tooltip("Adaptation speed from a dark to a light environment.")]
			[Min(0f)]
			public float speedUp;

			// Token: 0x040006FA RID: 1786
			[Tooltip("Adaptation speed from a light to a dark environment.")]
			[Min(0f)]
			public float speedDown;

			// Token: 0x040006FB RID: 1787
			[Tooltip("Lower bound for the brightness range of the generated histogram (in EV). The bigger the spread between min & max, the lower the precision will be.")]
			[Range(-16f, -1f)]
			public int logMin;

			// Token: 0x040006FC RID: 1788
			[Tooltip("Upper bound for the brightness range of the generated histogram (in EV). The bigger the spread between min & max, the lower the precision will be.")]
			[Range(1f, 16f)]
			public int logMax;
		}
	}
}
